import instance from '@/api/bimface/bimid';

// 获取bim的构件id
export function getComponentIdByXMLcode(pileNumberSublevel, pileNumberStake) {
  const accessToken = localStorage.getItem('bimface_access_token');
  return instance({
    url: '/query/elementIds',
    method: 'post',
    headers: {
      Authorization: 'Bearer ' + accessToken,
      'Content-Type': 'application/json',
    },
    data: {
      targetType: 'file',
      targetIds: ['10000815419571'],
      query: {
        match: {
          分段: pileNumberSublevel,
          桩号: pileNumberStake,
        },
      },
    },
  });
}
